<%@page import="com.libweb.model.dto.Member"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>사용자 정보</title>
	<link rel="Stylesheet" href="/libweb/styles/default.css" />
	<link rel="Stylesheet" href="/libweb/styles/input.css" />
	<script type="text/javascript">
		function doDelete(memberid,loginuser) {
			var ok = confirm("계정을 삭제합니다.");
			if (ok) {
				//삭제처리
				location.href="delete.action?memberid=" + memberid + "&loginuser=" + loginuser;
			}
		}
	</script>		
</head>
<body>
	 
	<div id="pageContainer">
		
		<% pageContext.include("/WEB-INF/views/include/header.jsp"); %>
		<% Member memberu = (Member)session.getAttribute("loginuser"); %>
		
		<div id="inputcontent">
			<br /><br />
		    <div id="inputmain">
		        <div class="inputsubtitle">회원 기본 정보</div>
				<%
				Member member = (Member)request.getAttribute("member");
				%>
		        <table>
		            <tr>
		                <th>아이디</th>
		                <td><%= member.getMemberId() %></td>
		            </tr>
		            <tr>
		                <th>이름</th>
		                <td><%= member.getName() %></td>
		            </tr>
		            <tr>
		                <th>주소</th>
		                <td><%= member.getAddress() %></td>
		            </tr>		            
		            <tr>
		                <th>전화번호</th>
		                <td><%= member.getPhoneNo() %></td>
		            </tr>
		            <tr>
		                <th>등록일자</th>
		                <td><%= member.getRegDate() %></td>
		            </tr>		            		            
		        </table>
		        <div class="buttons">
		        	<a href="/libweb/member/list.action">목록</a>
		        	&nbsp;&nbsp;
		        	<a href="javascript:doDelete('<%=member.getMemberId()%>','<%=memberu.getMemberId()%>');">계정 삭제</a>
		        </div>
		    </div>
		</div>   		
		
	</div>

</body>
</html>